import { useConfigStore } from '@/store/index';
import request from '@/common/vmeitime-http';

//获取用户信息
export function getUserInfo(){
  const configStore = useConfigStore();

  return request.request({
    url: `/account/mall/api/info?version=${configStore.privacyVersion}`
  })
}


/**
 * desc 修改用户信息
 * @param phone 手机号
 * @param wx_id
 * @param image 头像
 * @param nickname 昵称
 * @param sex
 * @param province
 * @parma country
 * @param city
 */
export function submitUserInfo(params){
    return request.request({
      url: '/account/mall/api/info',
      method: 'post',
      data: params
    })
}

/**
 * 获取上周是否已填写
*/
export function getLastWeekVisitDataAPI(){
  return request.request({
      url: `/product/mall/v6/sell/data/detail`
  })
}